# 需要先打开代理才能访问.

export https_proxy=http://127.0.0.1:7890;export http_proxy=http://127.0.0.1:7890;export all_proxy=socks5://127.0.0.1:7890

OPENAI_API_KEY=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

# 测试对话
function greet() {
curl https://api.openai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
     "model": "gpt-3.5-turbo",
     "messages": [{"role": "user", "content": "Say this is a test!"}],
     "temperature": 0.7
   }'
}


# 获取模型信息
function retrieveModel(){
curl https://api.openai.com/v1/models/gpt-3.5-turbo-instruct \
  -H "Authorization: Bearer $OPENAI_API_KEY"
}

# retrieveModel 
greet